home *** CD-ROM | disk | FTP | other *** search
- global gScriptAuthoringWindow, gNavScriptAuthorWindow, gCurrentCastLib, gPuppetList, gMaskName, gCostumeName, gFloatName, gBandName, gFloatReplaceMember, gBandReplaceMember, gPathDelimiter, gCostumeSpriteList, gParadePartsList
-
- on openThisWindow
- set gScriptAuthoringWindow to the activeWindow
- if the activeWindow = the stage then
- nothing()
- else
- set the windowType of gScriptAuthoringWindow to 4
- set the title of gScriptAuthoringWindow to "Scriptable Authoring"
- end if
- end
-
- on closeWindow
- sound stop 1
- sound stop 2
- forget(gNavScriptAuthorWindow)
- forget(gScriptAuthoringWindow)
- if count(the windowList) < 1 then
- clearGlobals()
- end if
- end
-
- on prepareMovie
- openThisWindow()
- if objectp(gNavScriptAuthorWindow) then
- forget(gNavScriptAuthorWindow)
- end if
- InitGlobals()
- end
-
- on InitGlobals
- set gPuppetList to [:]
- addProp(gPuppetList, #maskHilite, 18)
- addProp(gPuppetList, #costumeHilite, 25)
- addProp(gPuppetList, #captainCostume, 29)
- addProp(gPuppetList, #captainMask, 30)
- addProp(gPuppetList, #setOneCast, 5)
- addProp(gPuppetList, #setTwoCast, 9)
- addProp(gPuppetList, #floatSprite, 15)
- addProp(gPuppetList, #bandSprite, 31)
- addProp(gPuppetList, #aquaFloat, 8)
- addProp(gPuppetList, #cosmosFloat, 10)
- addProp(gPuppetList, #tropicanaFloat, 12)
- addProp(gPuppetList, #royHarperBand, 24)
- addProp(gPuppetList, #hanksVoodooBand, 26)
- addProp(gPuppetList, #nightbloomersBand, 28)
- addProp(gPuppetList, #captainButton, 17)
- addProp(gPuppetList, #floatButton, 19)
- set gParadePartsList to [:]
- addProp(gParadePartsList, #floatChannel, 4)
- addProp(gParadePartsList, #headChannel, 6)
- addProp(gParadePartsList, #costumeChannel, 7)
- addProp(gParadePartsList, #maskChannel, 8)
- set gCurrentCastLib to "set1"
- set gMaskName to "None"
- set gCostumeName to "None"
- set gCostumeSpriteList to [#mask: 0, #costume: 0]
- set gFloatName to #aquaFloat
- set gBandName to #royHarperBand
- set gFloatReplaceMember to member 2 of castLib "Floats & Band"
- set gBandReplaceMember to member 71 of castLib "Floats & Band"
- if the machineType = 256 then
- set gPathDelimiter to "/"
- else
- set gPathDelimiter to ":"
- end if
- DisplayCurrentCastLib()
- InitNavWindow()
- end
-
- on InitNavWindow
- set gNavScriptAuthorWindow to window "ScriptAuthor-Navigate.dir"
- set the title of gNavScriptAuthorWindow to "Navigate.dir"
- if the machineType = 256 then
- set the windowType of gNavScriptAuthorWindow to 4
- else
- set the windowType of gNavScriptAuthorWindow to 5
- end if
- set the fileName of gNavScriptAuthorWindow to the pathName & "ScriptAuthor-Nav.dir"
- set windowHeight to 82
- set windowWidth to 240
- set verticalOffset to 265
- set horizontalOffset to 40
- if gScriptAuthoringWindow = the stage then
- set verticalOrigin to the stageTop
- set horizontalOrigin to the stageLeft
- else
- set verticalOrigin to getAt(the rect of gScriptAuthoringWindow, 2)
- set horizontalOrigin to getAt(the rect of gScriptAuthoringWindow, 1)
- end if
- set verticalOrigin to verticalOrigin + verticalOffset
- set horizontalOrigin to horizontalOrigin + horizontalOffset
- set the rect of gNavScriptAuthorWindow to rect(horizontalOrigin, verticalOrigin, horizontalOrigin + windowWidth, verticalOrigin + windowHeight)
- open(gNavScriptAuthorWindow)
- end
-
- on stopMovie
- if objectp(gNavScriptAuthorWindow) then
- forget(gNavScriptAuthorWindow)
- end if
- set the fileName of castLib "Costume set" to the pathName & "set1"
- importFileInto(gFloatReplaceMember, the pathName & "ScriptAuthor-Floats" & gPathDelimiter & string("aquaFloat.PCT"))
- importFileInto(gBandReplaceMember, the pathName & "ScriptAuthor-Bands" & gPathDelimiter & string("royHarperBand.PCT"))
- ClearTextFields()
- end
-
- on ClearTextFields
- set the text of member "gMaskName Field" to "default"
- set the text of member "gCostumeName Field" to "default"
- set the text of member "gCurrentCastLib Field" to "default"
- set the text of member "gFloatName Field" to "default"
- set the text of member "gBandName Field" to "default"
- end
-